
use YGGL
exec sp_addtype 'ID_type','char(6)','not null'


use YGGL

go
if exists(select name from sysobjects where name='Employees3')
	drop table Employees3


create table Employees3
(
	EmployeeID  ID_type,
	Name char(10) not null,
	Education char(4) not null,
	Birthday date not null,
	Sex bit not null default 1,
	WorkYear tinyint null,
	Addree varchar(12) null,
	PhoneNumber char(12) null,
	DepartmentID char(3) not null,
	Primary key(EmployeeID)
	)

use YGGL
declare @female bit
set @female=0
select EmployeeID,Name

